# vim:filetype=make
# make.config
# written by Jonas Juselius <jonas@iki.fi> Tue Dec  4 12:09:26 EET 2001
#

@SET_MAKE@

SHELL:=@SHELL@

host:=@host@
host_os:=@host_os@
host_cpu:=@host_cpu@
host_vendor:=@host_vendor@


PACKAGE_NAME:=@PACKAGE_NAME@
PACKAGE_TARNAME:=@PACKAGE_TARNAME@
PACKAGE_BUGREPORT:=@PACKAGE_BUGREPORT@
PACKAGE_VERSION:=@PACKAGE_VERSION@
ARCHIVE_NAME=$(PACKAGE_TARNAME)-$(PACKAGE_VERSION)
ARCHIVE_TARNAME=$(PACKAGE_TARNAME)_$(PACKAGE_VERSION)

CC:=@CC@
CXX:=@CXX@
FC:=@FC@
CPP:=@CPP@
CPPFLAGS:=@CPPFLAGS@
CFLAGS:=@CFLAGS@
CXXFLAGS:=@CXXFLAGS@
FCFLAGS:=@FCFLAGS@
LDFLAGS:=@LDFLAGS@
LIBS:=@LIBS@

LD:=@LD@
RAN:=@RANLIB@
STRIP:=@STRIP@
AWK:=@AWK@
AR:=@AR@
ETAGS:=@ETAGS@
CTAGS:=@CTAGS@
LN_S:=@LN_S@
YACC:=@YACC@
LEX:=@LEX@
LEXLIB:=@LEXLIB@
PYTHON_BIN=@PYTHON_BIN@
PYTHON_LIB=@PYTHON_LIB@

FORTRAN_COMPILER=@FORTRAN_COMPILER@

INSTALL:=@INSTALL@
INSTALL_DATA:=@INSTALL_DATA@
INSTALL_SCRIPT:=@INSTALL_SCRIPT@
INSTALL_PROGRAM:=@INSTALL_PROGRAM@
mkinstalldirs=$(topdir)/config/mkinstalldirs

FC_MODEXT=@FC_MODEXT@
FC_MODCASE=@FC_MODCASE@

prefix=@prefix@
exec_prefix=@exec_prefix@
inst_bindir=@bindir@
inst_libdir=@libdir@
inst_libexecdir=@libexecdir@
inst_includedir=@includedir@
inst_datadir=@datadir@

ifeq ($(patsubst /%,,@top_srcdir@),)
  topdir:=@top_srcdir@
else
  topdir:=$(builddir)/@top_srcdir@
endif
srcdir:=$(topdir)/$(notdir $(shell pwd))
libdir:=@top_libdir@
libexecdir:=@top_libexecdir@
bindir:=@top_bindir@
scriptdir:=@top_bindir@
includedir:=@top_includedir@
datadir:=@top_datadir@
datarootdir=@datarootdir@

ARCH=@host@

FCLIBS=@FCLIBS@

BLAS_LIBS=@BLAS_LIBS@ 
LAPACK_LIBS=@LAPACK_LIBS@ $(BLAS_LIBS)

BLAS95=@F90_LIBS_blas95@
LAPACK95=@F90_LIBS_lapack95@
LIBMPI_F90=@F90_LIBS_mpi_f90@
MPI_TYPE=@MPI_TYPE@
ENABLE_GIMIC=@ENABLE_GIMIC@

#Fortran flags
fcflags:=@fcflags@
fdebug:=@fdebug@
fprof:=@fprof@
frange:=@frange@
fldflags:=@fldflags@

# C compiler flags
cflags:=@cflags@
cdebug:=@cdebug@
cprof:=@cprof@
crange:=@crange@
cldflags:=@cldflags@

# C++ compiler flags
cxxflags:=@cxxflags@
cxxdebug:=@cxxdebug@
cxxprof:=@cxxprof@
cxxrange:=@cxxrange@
cxxldflags:=@cxxldflags@

ifdef DEBUG
  fcflags:=$(fdebug) 
  cflags:=$(cdebug) 
  cxxflags:=$(cxxdebug) 
  bindir:=.
endif

fcflags+=-I.. -I$(includedir) 
cflags+=-I.. -I$(includedir) 
cxxflags+=-I.. -I$(includedir) 

ifdef PROF
  fcflags+=$(fprof)
  fldflags+=$(fprof)
  cflags+=$(cprof)
  cldflags+=$(cprof)
  cxxflags+=$(cxxprof)
  cxxldflags+=$(cxxprof)
  bindir:=.
endif

ifdef RANGE
  fcflags+=$(frange)
  cflags+=$(crange)
  cxxflags+=$(cxxrange)
  bindir:=.
endif

fldflags:=$(fldflags) -L. -L$(libdir) $(LDFLAGS)
cldflags:=$(cldflags) -L. -L$(libdir) $(LDFLAGS)
cxxldflags:=$(cxxldflags) -L. -L$(libdir) $(LDFLAGS)

# remove extra whitespace
FCFLAGS:=$(strip  $(fcflags))
FLDFLAGS:=$(strip $(fldflags))

CFLAGS:=$(strip   $(cflags))
CLDFLAGS:=$(strip $(cldflags))

CXXFLAGS:=$(strip   $(cxxflags))
CXXLDFLAGS:=$(strip $(cxxldflags))

